/*
 * @Date: 2021-12-09 19:48:46
 * @LastEditors: LeeKing
 * @LastEditTime: 2021-12-13 10:46:43
 * @FilePath: \hrsaas\src\utils\auth.js
 */
import Cookies from 'js-cookie'

const TokenKey = 'hrsaas_token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
// 定义当前时间戳
export function setTokenTime() {
  return Cookies.set('token_time', Date.now())
}

// 获取当前时间戳
export function getTokenTime() {
  return Cookies.get('token_time')
}
